package com.ics.web.controller.travelstar.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ics.framework.util.PageUtil;
import com.ics.web.controller.travelstar.domain.TiresApplication;
import com.ics.web.controller.travelstar.dto.ApplicationSearchDTO;
import com.ics.web.controller.travelstar.mapper.TbTiresApplicationMapper;
import com.ics.web.controller.travelstar.service.ITbTiresApplicationService;
import org.springframework.stereotype.Service;

/**
 * 用户申请信息Service业务层处理
 *
 * @author ics
 * @date 2024-09-19
 */
@Service
public class TbTiresApplicationServiceImpl extends ServiceImpl<TbTiresApplicationMapper, TiresApplication> implements ITbTiresApplicationService {
    @Override
    public IPage<TiresApplication> listPage(ApplicationSearchDTO searchDTO) {
        LambdaQueryWrapper<TiresApplication> wrapper = Wrappers.lambdaQuery();
        wrapper.orderByDesc(TiresApplication::getCreateTime);
        return this.baseMapper.selectPage(PageUtil.getPage(searchDTO), wrapper);
    }
}
